package com.zqxq.lottery.entity.o2o.esports;

import com.zqxq.common.utils.DispatcherUtils;
import com.zqxq.lottery.entity.po.esports.ESportsPO;
import com.zqxq.lottery.entity.po.esports.ESportsTitlePO;
import com.zqxq.lottery.entity.vo.esports.ESportsTitleVO;
import com.zqxq.lottery.entity.vo.esports.ESportsVO;


public class ESportsTitleO2O {

    public static ESportsTitleVO toVO(ESportsTitlePO po) {
        if (po == null) {
            return null;
        }
        ESportsTitleVO eSportsTitleVO = new ESportsTitleVO();
        eSportsTitleVO.setId(DispatcherUtils.parseString(po.getId()));
        eSportsTitleVO.setTitleClass(DispatcherUtils.parseString(po.getClass()));
        eSportsTitleVO.setType(DispatcherUtils.parseString(po.getTitle_type()));
        eSportsTitleVO.setName(po.getTitle_name());
        eSportsTitleVO.setSort(DispatcherUtils.parseString(po.getSort()));
        eSportsTitleVO.setCreateTime(DispatcherUtils.parseDateTimeStr(po.getCreate_time()));
        eSportsTitleVO.setUpdateTime(DispatcherUtils.parseDateTimeStr(po.getUpdate_time()));
        return eSportsTitleVO;
    }

    public static ESportsTitlePO toPO(ESportsTitleVO vo) {
        if (vo == null) {
            return null;
        }
        ESportsTitlePO eSportsTitlePO = new ESportsTitlePO();
        eSportsTitlePO.setId(DispatcherUtils.parseLong(vo.getId()));
        eSportsTitlePO.setTitle_class(DispatcherUtils.parseInteger(vo.getClass()));
        eSportsTitlePO.setTitle_type(DispatcherUtils.parseInteger(vo.getType()));
        eSportsTitlePO.setTitle_name(vo.getName());
        eSportsTitlePO.setSort(DispatcherUtils.parseInteger(vo.getSort()));
        eSportsTitlePO.setCreate_time(DispatcherUtils.parseDateTime(vo.getCreateTime()));
        eSportsTitlePO.setUpdate_time(DispatcherUtils.parseDateTime(vo.getUpdateTime()));
        return eSportsTitlePO;
    }
}
